1. Field of the Invention
The present invention relates to a wavelet-based encoding method used, for example in an image processing apparatus, to compress image data that is to be held temporarily, and particularly to a wavelet-based encoding method suitable for still-image data.
2. Description of the Prior Art
According to a wavelet-based encoding method, image data is compressed in the following manner. First, the image data of each frame is divided into blocks each composed of a plurality of pixels. Next, each of the blocks thus obtained by division is divided into a plurality of frequency ranges by a frequency-range dividing filter, so that the image data, originally distributed along a space axis, is converted into data distributed along a frequency axis. Thereafter, the data is compressed by different methods appropriate for the individual frequency ranges, and is then encoded by a predetermined method.
The data divided into a plurality of frequency ranges is individually compressed in the following manner. In general, the higher the frequency, the less sensitive the human eye is to the variation of the amplitude. That is, the human eye is more sensitive to degradation of image quality in lower frequency ranges than in higher frequency ranges. Thus, it is advisable to use an encoding method that generates smaller quantization errors (i.e. that offers a low compression rate) for lower frequency ranges and use an encoding method that offers a high compression rate (i.e. that generates greater quantization errors) for higher frequency ranges. For example, DPCM (differential pulse code modulation) that generates no quantization errors is used for low frequency ranges, scalar quantization is used for intermediate frequency ranges (i.e. between low and high frequency ranges), and vector quantization is used for high frequency ranges.
Here, conventionally, for all of the frequency ranges that are to be subjected to scalar quantization, scalar quantization is performed with a uniform step number and with non-linear step widths that are so determined that the step width increases as the absolute value of the data increases. Moreover, for all of the frequency ranges that are to be subjected to vector quantization, vector quantization is performed in such a way that a set of mutually corresponding pieces of data throughout all of those frequency ranges is dealt with as a unit and by the use of a single code book; that is, always a fixed number of pieces of data is subjected to vector quantization using a fixed code book.
Here, data having a great absolute value does not occur frequently. This is why conventionally scalar quantization is performed using a wider step width according as the absolute value of data increases. However, data that does not occur frequently is exactly data that is conspicuous on the screen. Therefore, permitting greater quantization errors for such data leads to unacceptably large degradation of the decoded image.
On the other hand, for high frequency ranges, for which vector quantization is performed, always subjecting a fixed number of pieces of data to vector quantization using a fixed code book leads to unacceptably large degradation of the decoded image, depending on the type of the image, even though the human eye is less sensitive to degradation of image quality in high frequency ranges.
In addition, the frequency range dividing filter is realized by the use of a QMF (quadrature mirror filter), which is, as shown in FIG. 9, built as a common FIR (finite impulse response, i.e. non-recursive digital filter) composed of delay circuits (flip-flops) FF1, FF2, . . . , multipliers M1, M2, . . . , and an adder A, and thus requires a large circuit scale.
An object of the present invention is to provide a wavelet-based encoding method that makes it possible to reduce degradation of decoded data without unduly lowering the compression rate.
Another object of the present invention is to provide a wavelet-based encoding device that can be realized with a smaller circuit scale as a result of the use of a frequency range dividing filter having a unique configuration.
To achieve the above objects, according to a first feature of the present invention, a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along the frequency axis by using methods corresponding to individual frequency ranges, data in a plurality of frequency ranges along the frequency axis is compressed by performing scalar quantization with step numbers varied from one frequency range to another. This method allows the use of greater step numbers than is customary for lower frequency ranges among a plurality of frequency ranges that are to be subjected to scalar quantization. This reduces deterioration of decoded data without unduly lowering the compression rate.
According to a second feature of the present invention, in a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along the frequency axis by using methods corresponding to individual frequency ranges, as long as an absolute value of data is within a threshold value, scalar quantization is performed with an increasingly wide step width according as the absolute value of data increases and, when the absolute value of data exceeds the threshold value, no quantization is performed, so that data in a particular frequency range along the frequency axis is compressed. This method eliminates quantization errors for data, within the frequency ranges that are to be subjected to scalar quantization, that has a greater absolute value than the threshold value. This reduces degradation of decoded data without unduly lowering the compression rate, in particular in cases where image data is dealt with, where data having a great absolute value does not occur frequently.
According to a third feature of the present invention, in a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along the frequency axis by using methods corresponding to individual frequency ranges, data in a particular frequency range along the frequency axis is compressed by performing vector quantization using a code book selected from among a plurality of code books according to activity of the input data.
According to a fourth feature of the present invention, in the wavelet-based encoding method as claimed in claim 3, for each of local regions each composed of a plurality of pieces of the input data, a local average value is calculated by calculating an average value of those pieces of data, then local activity is calculated by calculating an average of squares of deviations of those pieces of data from the local average, and then the activity of the input data is calculated by calculating an average of the local activity of all of the local regions. The methods according to the third and fourth features described above allow vector quantization to be performed according to the type of input data. This reduces quantization errors and thus degradation of decoded data.
According to a fifth feature of the present invention, in a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along a frequency axis by using methods corresponding to individual frequency ranges, wherein data in a particular frequency range along the frequency axis is compressed by performing vector quantization on quantization units varied according to quantization errors resulting from vector quantization. This method allows vector quantization to be performed with a smaller quantization unit only when quantization errors are great. This reduces degradation of decoded data without unduly lowering the compression rate.
According to a sixth feature of the present invention, in a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along a frequency axis by using methods corresponding to individual frequency ranges, data in a particular frequency range along the frequency axis is compressed by performing vector quantization or scalar quantization according to quantization errors resulting from vector quantization. This method allows vector quantization to be used when quantization errors are relatively small and scalar quantization when quantization errors are relatively great. This reduces degradation of decoded data without unduly lowering the compression rate.
According to a seventh feature of the present invention, in a wavelet-based encoding method that converts input data, distributed along a space axis, into data distributed along a frequency axis by using a frequency range dividing filter and that compresses the data distributed along a frequency axis by using methods corresponding to individual frequency ranges, the frequency range dividing filter is composed of a plurality of non-recursive digital filters and performs a multiplication operation by exploiting a fact that a value is approximated by adding or subtracting a value obtained by shifting digits of another value. This configuration helps reduce the number of multipliers required in the frequency range dividing filter and thereby reduce the circuit scale.